<template>
  <div class="container">
    <div style="">
      <div class="card_nd_title">
        <span>糖尿病并发症</span>
        <div class="line" style="width:96px;"></div>
      </div>
      <div class="content_box">
        <div class="card_content" v-if="report.nephropathyText !== null && report.nephropathyText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病肾病</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.nephropathyDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="12">{{ report.nephropathyData.split(',')[0] }}</a-col>
              <a-col class="item" :span="12">{{ report.nephropathyData.split(',')[1] }}</a-col>
              <a-col class="item" :span="12">{{ report.nephropathyData.split(',')[2] }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.hhsText !== null && report.hhsText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病高渗综合症</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.hhsDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="12">随机血糖：{{ report.hhsRandomSugar }}</a-col>
              <a-col class="item" :span="12">电解质（Na+）：{{ report.hhsNa }}</a-col>
              <a-col class="item" :span="12">电解质（K+）：{{ report.hhsK }}</a-col>
              <a-col class="item" :span="12">血浆渗透压：{{ report.hhsOpp }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.peripheralText !== null && report.peripheralText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病周围神经病变</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.peripheralDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="12" v-for="item in report.peripheralData.split(';')" :key="item">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.retinopathyText !== null && report.retinopathyText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病视网膜病变</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.retinopathyDate }}</div>
          <div>
            <a-row>
              <a-col class="item" v-for="item in report.retinopathyData.split(';')" :key="item" :span="24">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.digestiveText !== null && report.digestiveText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">消化系统自主神经病变</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.digestiveDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="24" v-for="item in report.digestiveData.split(';')" :key="item">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.cardiovascularText !== null && report.cardiovascularText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">心血管自主神经病变</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.cardiovascularDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="24" v-for="item in report.cardiovascularData.split(';')" :key="item">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.otherneuropathyText !== null && report.otherneuropathyText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">其他自主神经病变</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.otherneuropathyDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="12" v-for="item in report.otherneuropathyItem.split(';')" :key="item">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.genitourinaryText !== null && report.genitourinaryText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">泌尿生殖系统自主神经病变</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.genitourinaryDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="12" v-for="item in report.genitourinaryData.split(';')" :key="item">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.dfootText !== null && report.dfootText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病足</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.dfootDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="12" v-for="item in report.dfootData.split(';')" :key="item">{{ item }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.extremityText !== null && report.extremityText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病下肢血管病变</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.extremityDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="12" v-for="item in report.extremityData.split(';')" :key="item">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.dkaText !== null && report.dkaText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">酮症酸中毒</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div class="item">确诊日期：{{ report.dkaDate }}</div>
          <div>
            <a-row>
              <a-col class="item" :span="24" v-for="item in report.dkaData.split(';')" :key="item">{{ item }}</a-col>
            </a-row>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Complication',
  props: ['report'],
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="less" scoped>
// /deep/ .ant-descriptions-item-label {
//   width: 25% !important;
// }
// /deep/ .ant-descriptions-item-content {
//   width: 75% !important;
// }

@media print {
  .container {
    page-break-inside: avoid;
  }
}
.container {
  padding: 50px 24px 0 24px;
}

.card_nd_title {
  margin-bottom: 30px;
  span {
    font-size: 16px;
    // padding-left: 10px;
    font-weight: bold;
    color: #000;
  }
}
.line {
  height: 6px;
  border-radius: 6px;
  // margin-left: 10px;
  background-color: #00b5d4;
  opacity: 0.3;
}
.content_box {
  column-count: 2;
  // display: flex;
  // flex-wrap: wrap;
  // justify-content: space-between;
}
// .left_box {
//   width: 45%;
//   display: flex;
//   flex-direction: column;
// }
// .right_box {
//   width: 45%;
//   display: flex;
//   flex-direction: column;
// }
.card_content {
  break-inside: avoid;
  // display: inline-block;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #ccc;
}
// .card_content:nth-child(1),
// .card_content:nth-child(3),
// .card_content:nth-child(5),
// .card_content:nth-child(7),
// .card_content:nth-child(9) {
//   margin-right: 10%;
// }
.item {
  margin-bottom: 20px;
}
</style>

